package com.example.provider.config;

import com.netflix.loadbalancer.IRule;
import org.springframework.cloud.netflix.ribbon.RibbonClients;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
@RibbonClients(defaultConfiguration = CustomRibbonConfig.class)
public class CustomRibbonConfig {
    
    @Bean
    public IRule ribbonRule() {
        return new CustomRule(); // 返回自定义的负载均衡规则
    }
}